#!/bin/sh

# $0 - shell file; $1 - dev/test/prod; $2 - hudson build

# --- setup ---

PROJECT_PATH=`cd \`dirname $0\`;cd ..;pwd`
TIMESTAMP=`date +%Y%m%d-%H%M`

cd ${PROJECT_PATH}
cd output

# --- copy and compile ---
RELEASE_FILE=`ls -lrt *.zip | tail -1 | awk -F " " '{print $9}'`

mv $RELEASE_FILE  ROOT$TIMESTAMP.war

#mv $RELEASE_FILE  ROOT.war
path=$PROJECT_PATH/output/ROOT$TIMESTAMP.war
# --- pack ---
/Users/luoyouhua/Documents/tool/vpn/lscp wechat24 $path /home/images/war/controller/  dsp

#echo $path

